package com.hsnn.medstgmini.pro.plan.model;

import java.sql.Timestamp;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.hibernate.annotations.NotFound;
import org.hibernate.annotations.NotFoundAction;

import com.hsnn.medstgmini.util.ParseNumber;

/**
 * @category 调价计划视图实体类
 * @author 韩守松
 * @date 2015年6月18日
 */
@Entity
@Table(name = "view_priceadjplan")
public class ViewPriceadjplan implements java.io.Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 4311416324714491808L;

	private String priceAdjPlanName;// 调价计划名称
	private String priceAdjPlanCat;// 调价计划类型
	private Short executeCat;// 执行类型
	private Timestamp executeDatetime;// 创建时间
	private String priceAdjAccord;// 调价依据
	private String projRemark;// 项目备注
	private Timestamp projCreateDatetime;// 项目创建时间
	private String projCreateUser;// 项目创建人
	private String priceAdjPalnDetailId;// 调价计划明细id
	private String priceAdjPlanId;// 调价计划id
	private String goodsCode;// 商品编号
	private Double origProPriceLimit;// 原采购价格
	private String origProPriceLimitStr = "0.00"; // 原采购价格保留两位小数
	private Double currProPriceLimit;// 新采购限价
	private String currProPriceLimitStr = "0.00"; // 新采购限价保留两位小数
	private Double origRetailPriceLimit;// 原最高零售价
	private String origRetailPriceLimitStr = "0.00"; // 原最高零售价保留两位小数
	private Double currRetailPriceLlimit;// 新最高零售价
	private String currRetailPriceLlimitStr = "0.00"; // 新最高零售价保留两位小数
	private Timestamp addDatetime;// 加入采购时间
	private String addUser;// 加入计划操作人
	private String projId;// 项目id
	private String drugId;// 药品id
	private String drugCat;// 药品分类
	private Double proPriceLimit;// 采购限价
	private String proPriceLimitStr = "0.00"; // 采购限价保留两位小数
	private Double retailPriceLimit;// 最高零售限价
	private String retailPriceLimitStr = "0.00"; // 最高零售限价保留两位小数
	private Short status;// 调价计划状态0未执行 1已执行
	private Timestamp updDatetime;// 更新时间
	private String updUser;// 更新人
	private String drugCode;// 药品编码
	private String drugName;// 通用名
	private String drugNameSpel;// 通用名拼音码
	private String drugNameEng;// 通用名英文
	private String busName;// 商品名
	private String formId;// 剂型id
	private String specId;// 规格id
	private Integer factor;// 转换系数 没有填1
	private String unit;// 包装单位
	private String prodCompId;// 生产企业id
	private String materialId;// 材质id
	private String approvalCode;// 批准文号
	private Timestamp approvalDate;// 批准日期
	private String historyDrugCode;// 历史药品编码
	private Short mergeStatus;// 合并处理状态0未处理1已处理
	private String projCode;// 项目编号
	private String name;// 项目名称
	private String projIntro;// 项目简介
	private Timestamp starttime;// 采购开始时间
	private Timestamp endtime;// 采购结束时间
	private String projCat;// 项目类型
	private String remark;// 备注
	private Timestamp createDatetime;// 创建时间
	private String createUser;// 创建人
	private String formCode;// 剂型编码
	private String formName;// 剂型名称
	private String specCode;// 规格编码
	private String specName;// 规格名称
	private String materialName;
	private String compName;// 企业名称
	private String compSpelCode;//企业拼音码comp_spel_code

	// Constructors


	

	/** default constructor */
	public ViewPriceadjplan() {
	}

	/** minimal constructor */
	public ViewPriceadjplan(String priceAdjPalnDetailId) {
		this.priceAdjPalnDetailId = priceAdjPalnDetailId;
	}

	/** full constructor */
	public ViewPriceadjplan(String priceAdjPalnDetailId, String priceAdjPlanId,
			String goodsCode, Double origProPriceLimit,
			Double currProPriceLimit, Double origRetailPriceLimit,
			Double currRetailPriceLlimit, Timestamp addDatetime,
			String addUser, String priceAdjPlanName, String priceAdjPlanCat,
			Short executeCat, Timestamp createDatetime, String createUser,
			Timestamp executeDatetime, String priceAdjAccord, String remark,
			Short status, Timestamp updDatetime, String updUser, String projId,
			String drugId, String drugCat, Double proPriceLimit,
			Double retailPriceLimit, String drugCode, String drugName,
			String drugNameSpel, String drugNameEng, String busName,
			String formId, String specId, Integer factor, String unit,
			String prodCompId, String materialId, String approvalCode,
			Timestamp approvalDate, String historyDrugCode, Short mergeStatus,
			String projCode, String name, String projIntro,
			Timestamp starttime, Timestamp endtime, String projCat,
			String projRemark, Timestamp projCreateDatetime,
			String projCreateUser, String formCode, String formName,
			String specCode, String specName, String compName,String compSpelCode) {
		this.priceAdjPalnDetailId = priceAdjPalnDetailId;
		this.priceAdjPlanId = priceAdjPlanId;
		this.goodsCode = goodsCode;
		this.origProPriceLimit = origProPriceLimit;
		this.currProPriceLimit = currProPriceLimit;
		this.origRetailPriceLimit = origRetailPriceLimit;
		this.currRetailPriceLlimit = currRetailPriceLlimit;
		this.addDatetime = addDatetime;
		this.addUser = addUser;
		this.priceAdjPlanName = priceAdjPlanName;
		this.priceAdjPlanCat = priceAdjPlanCat;
		this.executeCat = executeCat;
		this.createDatetime = createDatetime;
		this.createUser = createUser;
		this.executeDatetime = executeDatetime;
		this.priceAdjAccord = priceAdjAccord;
		this.remark = remark;
		this.status = status;
		this.updDatetime = updDatetime;
		this.updUser = updUser;
		this.projId = projId;
		this.drugId = drugId;
		this.drugCat = drugCat;
		this.proPriceLimit = proPriceLimit;
		this.retailPriceLimit = retailPriceLimit;
		this.drugCode = drugCode;
		this.drugName = drugName;
		this.drugNameSpel = drugNameSpel;
		this.drugNameEng = drugNameEng;
		this.busName = busName;
		this.formId = formId;
		this.specId = specId;
		this.factor = factor;
		this.unit = unit;
		this.prodCompId = prodCompId;
		this.materialId = materialId;
		this.approvalCode = approvalCode;
		this.approvalDate = approvalDate;
		this.historyDrugCode = historyDrugCode;
		this.mergeStatus = mergeStatus;
		this.projCode = projCode;
		this.name = name;
		this.projIntro = projIntro;
		this.starttime = starttime;
		this.endtime = endtime;
		this.projCat = projCat;
		this.projRemark = projRemark;
		this.projCreateDatetime = projCreateDatetime;
		this.projCreateUser = projCreateUser;
		this.formCode = formCode;
		this.formName = formName;
		this.specCode = specCode;
		this.specName = specName;
		this.compName = compName;
		this.compSpelCode = compSpelCode;
	}

	// Property accessors

	@Column(name = "price_adj_paln_detail_id", nullable = false, length = 36)
	@Id
	public String getPriceAdjPalnDetailId() {
		return this.priceAdjPalnDetailId;
	}

	public void setPriceAdjPalnDetailId(String priceAdjPalnDetailId) {
		this.priceAdjPalnDetailId = priceAdjPalnDetailId;
	}

	@Column(name = "price_adj_plan_id", length = 36)
	public String getPriceAdjPlanId() {
		return this.priceAdjPlanId;
	}

	public void setPriceAdjPlanId(String priceAdjPlanId) {
		this.priceAdjPlanId = priceAdjPlanId;
	}

	@Column(name = "goods_code", length = 36)
	public String getGoodsCode() {
		return this.goodsCode;
	}

	public void setGoodsCode(String goodsCode) {
		this.goodsCode = goodsCode;
	}

	@Column(name = "orig_pro_price_limit", precision = 18, scale = 3)
	public Double getOrigProPriceLimit() {
		return this.origProPriceLimit;
	}

	public void setOrigProPriceLimit(Double origProPriceLimit) {
		this.origProPriceLimit = origProPriceLimit;
	}

	@Transient
	public String getOrigProPriceLimitStr() {
		if (origProPriceLimit != null) {
			origProPriceLimitStr = ParseNumber.toStrDecimal(origProPriceLimit);
		}
		return origProPriceLimitStr;
	}

	public void setOrigProPriceLimitStr(String origProPriceLimitStr) {
		this.origProPriceLimitStr = origProPriceLimitStr;
	}

	@Transient
	public String getCurrProPriceLimitStr() {
		if (currProPriceLimit != null) {
			currProPriceLimitStr = ParseNumber.toStrDecimal(currProPriceLimit);
		}
		return currProPriceLimitStr;
	}

	public void setCurrProPriceLimitStr(String currProPriceLimitStr) {
		this.currProPriceLimitStr = currProPriceLimitStr;
	}

	@Transient
	public String getOrigRetailPriceLimitStr() {
		if (origRetailPriceLimit != null) {
			origRetailPriceLimitStr = ParseNumber
					.toStrDecimal(origRetailPriceLimit);
		}
		return origRetailPriceLimitStr;
	}

	public void setOrigRetailPriceLimitStr(String origRetailPriceLimitStr) {
		this.origRetailPriceLimitStr = origRetailPriceLimitStr;
	}

	@Transient
	public String getCurrRetailPriceLlimitStr() {
		if (currRetailPriceLlimit != null) {
			currRetailPriceLlimitStr = ParseNumber
					.toStrDecimal(currRetailPriceLlimit);
		}
		return currRetailPriceLlimitStr;
	}

	public void setCurrRetailPriceLlimitStr(String currRetailPriceLlimitStr) {
		this.currRetailPriceLlimitStr = currRetailPriceLlimitStr;
	}

	@Column(name = "curr_pro_price_limit", precision = 18, scale = 3)
	public Double getCurrProPriceLimit() {
		return this.currProPriceLimit;
	}

	public void setCurrProPriceLimit(Double currProPriceLimit) {
		this.currProPriceLimit = currProPriceLimit;
	}

	@Column(name = "orig_retail_price_limit", precision = 18, scale = 3)
	public Double getOrigRetailPriceLimit() {
		return this.origRetailPriceLimit;
	}

	public void setOrigRetailPriceLimit(Double origRetailPriceLimit) {
		this.origRetailPriceLimit = origRetailPriceLimit;
	}

	@Column(name = "curr_retail_price_llimit", precision = 18, scale = 3)
	public Double getCurrRetailPriceLlimit() {
		return this.currRetailPriceLlimit;
	}

	public void setCurrRetailPriceLlimit(Double currRetailPriceLlimit) {
		this.currRetailPriceLlimit = currRetailPriceLlimit;
	}

	@Transient
	public String getProPriceLimitStr() {
		if (proPriceLimit != null) {
			proPriceLimitStr = ParseNumber.toStrDecimal(proPriceLimit);
		}
		return proPriceLimitStr;
	}

	public void setProPriceLimitStr(String proPriceLimitStr) {
		this.proPriceLimitStr = proPriceLimitStr;
	}

	@Transient
	public String getRetailPriceLimitStr() {
		if (retailPriceLimit != null) {
			retailPriceLimitStr = ParseNumber.toStrDecimal(retailPriceLimit);
		}
		return retailPriceLimitStr;
	}

	public void setRetailPriceLimitStr(String retailPriceLimitStr) {
		this.retailPriceLimitStr = retailPriceLimitStr;
	}

	@Column(name = "add_datetime", length = 19)
	public Timestamp getAddDatetime() {
		return this.addDatetime;
	}

	public void setAddDatetime(Timestamp addDatetime) {
		this.addDatetime = addDatetime;
	}

	@Column(name = "add_user", length = 36)
	public String getAddUser() {
		return this.addUser;
	}

	public void setAddUser(String addUser) {
		this.addUser = addUser;
	}

	@Column(name = "price_adj_plan_name", length = 512)
	public String getPriceAdjPlanName() {
		return this.priceAdjPlanName;
	}

	public void setPriceAdjPlanName(String priceAdjPlanName) {
		this.priceAdjPlanName = priceAdjPlanName;
	}

	@Column(name = "price_adj_plan_cat", length = 128)
	public String getPriceAdjPlanCat() {
		return this.priceAdjPlanCat;
	}

	public void setPriceAdjPlanCat(String priceAdjPlanCat) {
		this.priceAdjPlanCat = priceAdjPlanCat;
	}

	@Column(name = "execute_cat")
	public Short getExecuteCat() {
		return this.executeCat;
	}

	public void setExecuteCat(Short executeCat) {
		this.executeCat = executeCat;
	}

	@Column(name = "create_datetime", length = 19)
	public Timestamp getCreateDatetime() {
		return this.createDatetime;
	}

	public void setCreateDatetime(Timestamp createDatetime) {
		this.createDatetime = createDatetime;
	}

	@Column(name = "create_user", length = 36)
	public String getCreateUser() {
		return this.createUser;
	}

	public void setCreateUser(String createUser) {
		this.createUser = createUser;
	}

	@Column(name = "execute_datetime", length = 19)
	public Timestamp getExecuteDatetime() {
		return this.executeDatetime;
	}

	public void setExecuteDatetime(Timestamp executeDatetime) {
		this.executeDatetime = executeDatetime;
	}

	@Column(name = "price_adj_accord", length = 512)
	public String getPriceAdjAccord() {
		return this.priceAdjAccord;
	}

	public void setPriceAdjAccord(String priceAdjAccord) {
		this.priceAdjAccord = priceAdjAccord;
	}

	@Column(name = "remark", length = 1024)
	public String getRemark() {
		return this.remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	@Column(name = "status")
	public Short getStatus() {
		return this.status;
	}

	public void setStatus(Short status) {
		this.status = status;
	}

	@Column(name = "upd_datetime", length = 19)
	public Timestamp getUpdDatetime() {
		return this.updDatetime;
	}

	public void setUpdDatetime(Timestamp updDatetime) {
		this.updDatetime = updDatetime;
	}

	@Column(name = "upd_user", length = 36)
	public String getUpdUser() {
		return this.updUser;
	}

	public void setUpdUser(String updUser) {
		this.updUser = updUser;
	}

	@Column(name = "proj_id", length = 36)
	public String getProjId() {
		return this.projId;
	}

	public void setProjId(String projId) {
		this.projId = projId;
	}

	@Column(name = "drug_id", length = 36)
	public String getDrugId() {
		return this.drugId;
	}

	public void setDrugId(String drugId) {
		this.drugId = drugId;
	}

	@Column(name = "drug_cat", length = 128)
	public String getDrugCat() {
		return this.drugCat;
	}

	public void setDrugCat(String drugCat) {
		this.drugCat = drugCat;
	}

	@Column(name = "pro_price_limit", precision = 18, scale = 3)
	public Double getProPriceLimit() {
		return this.proPriceLimit;
	}

	public void setProPriceLimit(Double proPriceLimit) {
		this.proPriceLimit = proPriceLimit;
	}

	@Column(name = "retail_price_limit", precision = 18, scale = 3)
	public Double getRetailPriceLimit() {
		return this.retailPriceLimit;
	}

	public void setRetailPriceLimit(Double retailPriceLimit) {
		this.retailPriceLimit = retailPriceLimit;
	}

	@Column(name = "drug_code", length = 100)
	public String getDrugCode() {
		return this.drugCode;
	}

	public void setDrugCode(String drugCode) {
		this.drugCode = drugCode;
	}

	@Column(name = "drug_name", length = 512)
	public String getDrugName() {
		return this.drugName;
	}

	public void setDrugName(String drugName) {
		this.drugName = drugName;
	}

	@Column(name = "drug_name_spel", length = 128)
	public String getDrugNameSpel() {
		return this.drugNameSpel;
	}
	
	@Column(name = "comp_spel_code", length = 128)
	public String getCompSpelCode() {
		return compSpelCode;
	}
	public void setCompSpelCode(String compSpelCode) {
		this.compSpelCode = compSpelCode;
	}

	public void setDrugNameSpel(String drugNameSpel) {
		this.drugNameSpel = drugNameSpel;
	}

	@Column(name = "drug_name_eng", length = 512)
	public String getDrugNameEng() {
		return this.drugNameEng;
	}

	public void setDrugNameEng(String drugNameEng) {
		this.drugNameEng = drugNameEng;
	}

	@Column(name = "bus_name", length = 256)
	public String getBusName() {
		return this.busName;
	}

	public void setBusName(String busName) {
		this.busName = busName;
	}

	@Column(name = "form_id", length = 36)
	public String getFormId() {
		return this.formId;
	}

	public void setFormId(String formId) {
		this.formId = formId;
	}

	@Column(name = "spec_id", length = 36)
	public String getSpecId() {
		return this.specId;
	}

	public void setSpecId(String specId) {
		this.specId = specId;
	}

	@Column(name = "factor")
	public Integer getFactor() {
		return this.factor;
	}

	public void setFactor(Integer factor) {
		this.factor = factor;
	}

	@Column(name = "unit", length = 36)
	public String getUnit() {
		return this.unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}

	@Column(name = "prod_comp_id", length = 36)
	public String getProdCompId() {
		return this.prodCompId;
	}

	public void setProdCompId(String prodCompId) {
		this.prodCompId = prodCompId;
	}

	@Column(name = "material_id", length = 36)
	public String getMaterialId() {
		return this.materialId;
	}

	public void setMaterialId(String materialId) {
		this.materialId = materialId;
	}

	@Column(name = "approval_code", length = 100)
	public String getApprovalCode() {
		return this.approvalCode;
	}

	public void setApprovalCode(String approvalCode) {
		this.approvalCode = approvalCode;
	}

	@Column(name = "approval_date", length = 19)
	public Timestamp getApprovalDate() {
		return this.approvalDate;
	}

	public void setApprovalDate(Timestamp approvalDate) {
		this.approvalDate = approvalDate;
	}

	@Column(name = "history_drug_code", length = 100)
	public String getHistoryDrugCode() {
		return this.historyDrugCode;
	}

	public void setHistoryDrugCode(String historyDrugCode) {
		this.historyDrugCode = historyDrugCode;
	}

	@Column(name = "merge_status")
	public Short getMergeStatus() {
		return this.mergeStatus;
	}

	public void setMergeStatus(Short mergeStatus) {
		this.mergeStatus = mergeStatus;
	}

	@Column(name = "proj_code", length = 100)
	public String getProjCode() {
		return this.projCode;
	}

	public void setProjCode(String projCode) {
		this.projCode = projCode;
	}

	@Column(name = "name", length = 256)
	public String getName() {
		return this.name;
	}

	public void setName(String name) {
		this.name = name;
	}

	@Column(name = "proj_intro", length = 4000)
	public String getProjIntro() {
		return this.projIntro;
	}

	public void setProjIntro(String projIntro) {
		this.projIntro = projIntro;
	}

	@Column(name = "starttime", length = 19)
	public Timestamp getStarttime() {
		return this.starttime;
	}

	public void setStarttime(Timestamp starttime) {
		this.starttime = starttime;
	}

	@Column(name = "endtime", length = 19)
	public Timestamp getEndtime() {
		return this.endtime;
	}

	public void setEndtime(Timestamp endtime) {
		this.endtime = endtime;
	}

	@Column(name = "proj_cat", length = 36)
	public String getProjCat() {
		return this.projCat;
	}

	public void setProjCat(String projCat) {
		this.projCat = projCat;
	}

	@Column(name = "projRemark", length = 4000)
	public String getProjRemark() {
		return this.projRemark;
	}

	public void setProjRemark(String projRemark) {
		this.projRemark = projRemark;
	}

	@Column(name = "projCreate_datetime", length = 19)
	public Timestamp getProjCreateDatetime() {
		return this.projCreateDatetime;
	}

	public void setProjCreateDatetime(Timestamp projCreateDatetime) {
		this.projCreateDatetime = projCreateDatetime;
	}

	@Column(name = "projCreate_user", length = 36)
	public String getProjCreateUser() {
		return this.projCreateUser;
	}

	public void setProjCreateUser(String projCreateUser) {
		this.projCreateUser = projCreateUser;
	}

	@Column(name = "form_code", length = 10)
	public String getFormCode() {
		return this.formCode;
	}

	public void setFormCode(String formCode) {
		this.formCode = formCode;
	}

	@Column(name = "form_name", length = 100)
	public String getFormName() {
		return this.formName;
	}

	public void setFormName(String formName) {
		this.formName = formName;
	}

	@Column(name = "spec_code", length = 10)
	public String getSpecCode() {
		return this.specCode;
	}

	public void setSpecCode(String specCode) {
		this.specCode = specCode;
	}

	@Column(name = "spec_name", length = 100)
	public String getSpecName() {
		return this.specName;
	}

	public void setSpecName(String specName) {
		this.specName = specName;
	}

	@Column(name = "material_name")
	public String getMaterialName() {
		return this.materialName;
	}

	public void setMaterialName(String materialName) {
		this.materialName = materialName;
	}
	
	@Column(name = "comp_name", length = 512)
	public String getCompName() {
		return this.compName;
	}

	public void setCompName(String compName) {
		this.compName = compName;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof ViewPriceadjplan))
			return false;
		ViewPriceadjplan castOther = (ViewPriceadjplan) other;

		return ((this.getPriceAdjPalnDetailId() == castOther
				.getPriceAdjPalnDetailId()) || (this.getPriceAdjPalnDetailId() != null
				&& castOther.getPriceAdjPalnDetailId() != null && this
				.getPriceAdjPalnDetailId().equals(
						castOther.getPriceAdjPalnDetailId())))
				&& ((this.getPriceAdjPlanId() == castOther.getPriceAdjPlanId()) || (this
						.getPriceAdjPlanId() != null
						&& castOther.getPriceAdjPlanId() != null && this
						.getPriceAdjPlanId().equals(
								castOther.getPriceAdjPlanId())))
				&& ((this.getGoodsCode() == castOther.getGoodsCode()) || (this
						.getGoodsCode() != null
						&& castOther.getGoodsCode() != null && this
						.getGoodsCode().equals(castOther.getGoodsCode())))
				&& ((this.getOrigProPriceLimit() == castOther
						.getOrigProPriceLimit()) || (this
						.getOrigProPriceLimit() != null
						&& castOther.getOrigProPriceLimit() != null && this
						.getOrigProPriceLimit().equals(
								castOther.getOrigProPriceLimit())))
				&& ((this.getCurrProPriceLimit() == castOther
						.getCurrProPriceLimit()) || (this
						.getCurrProPriceLimit() != null
						&& castOther.getCurrProPriceLimit() != null && this
						.getCurrProPriceLimit().equals(
								castOther.getCurrProPriceLimit())))
				&& ((this.getOrigRetailPriceLimit() == castOther
						.getOrigRetailPriceLimit()) || (this
						.getOrigRetailPriceLimit() != null
						&& castOther.getOrigRetailPriceLimit() != null && this
						.getOrigRetailPriceLimit().equals(
								castOther.getOrigRetailPriceLimit())))
				&& ((this.getCurrRetailPriceLlimit() == castOther
						.getCurrRetailPriceLlimit()) || (this
						.getCurrRetailPriceLlimit() != null
						&& castOther.getCurrRetailPriceLlimit() != null && this
						.getCurrRetailPriceLlimit().equals(
								castOther.getCurrRetailPriceLlimit())))
				&& ((this.getAddDatetime() == castOther.getAddDatetime()) || (this
						.getAddDatetime() != null
						&& castOther.getAddDatetime() != null && this
						.getAddDatetime().equals(castOther.getAddDatetime())))
				&& ((this.getAddUser() == castOther.getAddUser()) || (this
						.getAddUser() != null && castOther.getAddUser() != null && this
						.getAddUser().equals(castOther.getAddUser())))
				&& ((this.getPriceAdjPlanName() == castOther
						.getPriceAdjPlanName()) || (this.getPriceAdjPlanName() != null
						&& castOther.getPriceAdjPlanName() != null && this
						.getPriceAdjPlanName().equals(
								castOther.getPriceAdjPlanName())))
				&& ((this.getPriceAdjPlanCat() == castOther
						.getPriceAdjPlanCat()) || (this.getPriceAdjPlanCat() != null
						&& castOther.getPriceAdjPlanCat() != null && this
						.getPriceAdjPlanCat().equals(
								castOther.getPriceAdjPlanCat())))
				&& ((this.getExecuteCat() == castOther.getExecuteCat()) || (this
						.getExecuteCat() != null
						&& castOther.getExecuteCat() != null && this
						.getExecuteCat().equals(castOther.getExecuteCat())))
				&& ((this.getCreateDatetime() == castOther.getCreateDatetime()) || (this
						.getCreateDatetime() != null
						&& castOther.getCreateDatetime() != null && this
						.getCreateDatetime().equals(
								castOther.getCreateDatetime())))
				&& ((this.getCreateUser() == castOther.getCreateUser()) || (this
						.getCreateUser() != null
						&& castOther.getCreateUser() != null && this
						.getCreateUser().equals(castOther.getCreateUser())))
				&& ((this.getExecuteDatetime() == castOther
						.getExecuteDatetime()) || (this.getExecuteDatetime() != null
						&& castOther.getExecuteDatetime() != null && this
						.getExecuteDatetime().equals(
								castOther.getExecuteDatetime())))
				&& ((this.getPriceAdjAccord() == castOther.getPriceAdjAccord()) || (this
						.getPriceAdjAccord() != null
						&& castOther.getPriceAdjAccord() != null && this
						.getPriceAdjAccord().equals(
								castOther.getPriceAdjAccord())))
				&& ((this.getRemark() == castOther.getRemark()) || (this
						.getRemark() != null && castOther.getRemark() != null && this
						.getRemark().equals(castOther.getRemark())))
				&& ((this.getStatus() == castOther.getStatus()) || (this
						.getStatus() != null && castOther.getStatus() != null && this
						.getStatus().equals(castOther.getStatus())))
				&& ((this.getUpdDatetime() == castOther.getUpdDatetime()) || (this
						.getUpdDatetime() != null
						&& castOther.getUpdDatetime() != null && this
						.getUpdDatetime().equals(castOther.getUpdDatetime())))
				&& ((this.getUpdUser() == castOther.getUpdUser()) || (this
						.getUpdUser() != null && castOther.getUpdUser() != null && this
						.getUpdUser().equals(castOther.getUpdUser())))
				&& ((this.getProjId() == castOther.getProjId()) || (this
						.getProjId() != null && castOther.getProjId() != null && this
						.getProjId().equals(castOther.getProjId())))
				&& ((this.getDrugId() == castOther.getDrugId()) || (this
						.getDrugId() != null && castOther.getDrugId() != null && this
						.getDrugId().equals(castOther.getDrugId())))
				&& ((this.getDrugCat() == castOther.getDrugCat()) || (this
						.getDrugCat() != null && castOther.getDrugCat() != null && this
						.getDrugCat().equals(castOther.getDrugCat())))
				&& ((this.getProPriceLimit() == castOther.getProPriceLimit()) || (this
						.getProPriceLimit() != null
						&& castOther.getProPriceLimit() != null && this
						.getProPriceLimit()
						.equals(castOther.getProPriceLimit())))
				&& ((this.getRetailPriceLimit() == castOther
						.getRetailPriceLimit()) || (this.getRetailPriceLimit() != null
						&& castOther.getRetailPriceLimit() != null && this
						.getRetailPriceLimit().equals(
								castOther.getRetailPriceLimit())))
				&& ((this.getDrugCode() == castOther.getDrugCode()) || (this
						.getDrugCode() != null
						&& castOther.getDrugCode() != null && this
						.getDrugCode().equals(castOther.getDrugCode())))
				&& ((this.getDrugName() == castOther.getDrugName()) || (this
						.getDrugName() != null
						&& castOther.getDrugName() != null && this
						.getDrugName().equals(castOther.getDrugName())))
				&& ((this.getDrugNameSpel() == castOther.getDrugNameSpel()) || (this
						.getDrugNameSpel() != null
						&& castOther.getDrugNameSpel() != null && this
						.getDrugNameSpel().equals(castOther.getDrugNameSpel())))
				&& ((this.getDrugNameEng() == castOther.getDrugNameEng()) || (this
						.getDrugNameEng() != null
						&& castOther.getDrugNameEng() != null && this
						.getDrugNameEng().equals(castOther.getDrugNameEng())))
				&& ((this.getBusName() == castOther.getBusName()) || (this
						.getBusName() != null && castOther.getBusName() != null && this
						.getBusName().equals(castOther.getBusName())))
				&& ((this.getFormId() == castOther.getFormId()) || (this
						.getFormId() != null && castOther.getFormId() != null && this
						.getFormId().equals(castOther.getFormId())))
				&& ((this.getSpecId() == castOther.getSpecId()) || (this
						.getSpecId() != null && castOther.getSpecId() != null && this
						.getSpecId().equals(castOther.getSpecId())))
				&& ((this.getFactor() == castOther.getFactor()) || (this
						.getFactor() != null && castOther.getFactor() != null && this
						.getFactor().equals(castOther.getFactor())))
				&& ((this.getUnit() == castOther.getUnit()) || (this.getUnit() != null
						&& castOther.getUnit() != null && this.getUnit()
						.equals(castOther.getUnit())))
				&& ((this.getProdCompId() == castOther.getProdCompId()) || (this
						.getProdCompId() != null
						&& castOther.getProdCompId() != null && this
						.getProdCompId().equals(castOther.getProdCompId())))
				&& ((this.getMaterialId() == castOther.getMaterialId()) || (this
						.getMaterialId() != null
						&& castOther.getMaterialId() != null && this
						.getMaterialId().equals(castOther.getMaterialId())))
				&& ((this.getApprovalCode() == castOther.getApprovalCode()) || (this
						.getApprovalCode() != null
						&& castOther.getApprovalCode() != null && this
						.getApprovalCode().equals(castOther.getApprovalCode())))
				&& ((this.getApprovalDate() == castOther.getApprovalDate()) || (this
						.getApprovalDate() != null
						&& castOther.getApprovalDate() != null && this
						.getApprovalDate().equals(castOther.getApprovalDate())))
				&& ((this.getHistoryDrugCode() == castOther
						.getHistoryDrugCode()) || (this.getHistoryDrugCode() != null
						&& castOther.getHistoryDrugCode() != null && this
						.getHistoryDrugCode().equals(
								castOther.getHistoryDrugCode())))
				&& ((this.getMergeStatus() == castOther.getMergeStatus()) || (this
						.getMergeStatus() != null
						&& castOther.getMergeStatus() != null && this
						.getMergeStatus().equals(castOther.getMergeStatus())))
				&& ((this.getProjCode() == castOther.getProjCode()) || (this
						.getProjCode() != null
						&& castOther.getProjCode() != null && this
						.getProjCode().equals(castOther.getProjCode())))
				&& ((this.getName() == castOther.getName()) || (this.getName() != null
						&& castOther.getName() != null && this.getName()
						.equals(castOther.getName())))
				&& ((this.getProjIntro() == castOther.getProjIntro()) || (this
						.getProjIntro() != null
						&& castOther.getProjIntro() != null && this
						.getProjIntro().equals(castOther.getProjIntro())))
				&& ((this.getStarttime() == castOther.getStarttime()) || (this
						.getStarttime() != null
						&& castOther.getStarttime() != null && this
						.getStarttime().equals(castOther.getStarttime())))
				&& ((this.getEndtime() == castOther.getEndtime()) || (this
						.getEndtime() != null && castOther.getEndtime() != null && this
						.getEndtime().equals(castOther.getEndtime())))
				&& ((this.getProjCat() == castOther.getProjCat()) || (this
						.getProjCat() != null && castOther.getProjCat() != null && this
						.getProjCat().equals(castOther.getProjCat())))
				&& ((this.getProjRemark() == castOther.getProjRemark()) || (this
						.getProjRemark() != null
						&& castOther.getProjRemark() != null && this
						.getProjRemark().equals(castOther.getProjRemark())))
				&& ((this.getProjCreateDatetime() == castOther
						.getProjCreateDatetime()) || (this
						.getProjCreateDatetime() != null
						&& castOther.getProjCreateDatetime() != null && this
						.getProjCreateDatetime().equals(
								castOther.getProjCreateDatetime())))
				&& ((this.getProjCreateUser() == castOther.getProjCreateUser()) || (this
						.getProjCreateUser() != null
						&& castOther.getProjCreateUser() != null && this
						.getProjCreateUser().equals(
								castOther.getProjCreateUser())))
				&& ((this.getFormCode() == castOther.getFormCode()) || (this
						.getFormCode() != null
						&& castOther.getFormCode() != null && this
						.getFormCode().equals(castOther.getFormCode())))
				&& ((this.getFormName() == castOther.getFormName()) || (this
						.getFormName() != null
						&& castOther.getFormName() != null && this
						.getFormName().equals(castOther.getFormName())))
				&& ((this.getSpecCode() == castOther.getSpecCode()) || (this
						.getSpecCode() != null
						&& castOther.getSpecCode() != null && this
						.getSpecCode().equals(castOther.getSpecCode())))
				&& ((this.getSpecName() == castOther.getSpecName()) || (this
						.getSpecName() != null
						&& castOther.getSpecName() != null && this
						.getSpecName().equals(castOther.getSpecName())))
				&& ((this.getMaterialName() == castOther.getMaterialName()) || (this
						.getMaterialName() != null
						&& castOther.getMaterialName() != null && this
						.getMaterialName().equals(castOther.getMaterialName())))						
				&& ((this.getCompName() == castOther.getCompName()) || (this
						.getCompName() != null
						&& castOther.getCompName() != null && this
						.getCompName().equals(castOther.getCompName())));
	}

	public int hashCode() {
		int result = 17;

		result = 37
				* result
				+ (getPriceAdjPalnDetailId() == null ? 0 : this
						.getPriceAdjPalnDetailId().hashCode());
		result = 37
				* result
				+ (getPriceAdjPlanId() == null ? 0 : this.getPriceAdjPlanId()
						.hashCode());
		result = 37 * result
				+ (getGoodsCode() == null ? 0 : this.getGoodsCode().hashCode());
		result = 37
				* result
				+ (getOrigProPriceLimit() == null ? 0 : this
						.getOrigProPriceLimit().hashCode());
		result = 37
				* result
				+ (getCurrProPriceLimit() == null ? 0 : this
						.getCurrProPriceLimit().hashCode());
		result = 37
				* result
				+ (getOrigRetailPriceLimit() == null ? 0 : this
						.getOrigRetailPriceLimit().hashCode());
		result = 37
				* result
				+ (getCurrRetailPriceLlimit() == null ? 0 : this
						.getCurrRetailPriceLlimit().hashCode());
		result = 37
				* result
				+ (getAddDatetime() == null ? 0 : this.getAddDatetime()
						.hashCode());
		result = 37 * result
				+ (getAddUser() == null ? 0 : this.getAddUser().hashCode());
		result = 37
				* result
				+ (getPriceAdjPlanName() == null ? 0 : this
						.getPriceAdjPlanName().hashCode());
		result = 37
				* result
				+ (getPriceAdjPlanCat() == null ? 0 : this.getPriceAdjPlanCat()
						.hashCode());
		result = 37
				* result
				+ (getExecuteCat() == null ? 0 : this.getExecuteCat()
						.hashCode());
		result = 37
				* result
				+ (getCreateDatetime() == null ? 0 : this.getCreateDatetime()
						.hashCode());
		result = 37
				* result
				+ (getCreateUser() == null ? 0 : this.getCreateUser()
						.hashCode());
		result = 37
				* result
				+ (getExecuteDatetime() == null ? 0 : this.getExecuteDatetime()
						.hashCode());
		result = 37
				* result
				+ (getPriceAdjAccord() == null ? 0 : this.getPriceAdjAccord()
						.hashCode());
		result = 37 * result
				+ (getRemark() == null ? 0 : this.getRemark().hashCode());
		result = 37 * result
				+ (getStatus() == null ? 0 : this.getStatus().hashCode());
		result = 37
				* result
				+ (getUpdDatetime() == null ? 0 : this.getUpdDatetime()
						.hashCode());
		result = 37 * result
				+ (getUpdUser() == null ? 0 : this.getUpdUser().hashCode());
		result = 37 * result
				+ (getProjId() == null ? 0 : this.getProjId().hashCode());
		result = 37 * result
				+ (getDrugId() == null ? 0 : this.getDrugId().hashCode());
		result = 37 * result
				+ (getDrugCat() == null ? 0 : this.getDrugCat().hashCode());
		result = 37
				* result
				+ (getProPriceLimit() == null ? 0 : this.getProPriceLimit()
						.hashCode());
		result = 37
				* result
				+ (getRetailPriceLimit() == null ? 0 : this
						.getRetailPriceLimit().hashCode());
		result = 37 * result
				+ (getDrugCode() == null ? 0 : this.getDrugCode().hashCode());
		result = 37 * result
				+ (getDrugName() == null ? 0 : this.getDrugName().hashCode());
		result = 37
				* result
				+ (getDrugNameSpel() == null ? 0 : this.getDrugNameSpel()
						.hashCode());
		result = 37
				* result
				+ (getDrugNameEng() == null ? 0 : this.getDrugNameEng()
						.hashCode());
		result = 37 * result
				+ (getBusName() == null ? 0 : this.getBusName().hashCode());
		result = 37 * result
				+ (getFormId() == null ? 0 : this.getFormId().hashCode());
		result = 37 * result
				+ (getSpecId() == null ? 0 : this.getSpecId().hashCode());
		result = 37 * result
				+ (getFactor() == null ? 0 : this.getFactor().hashCode());
		result = 37 * result
				+ (getUnit() == null ? 0 : this.getUnit().hashCode());
		result = 37
				* result
				+ (getProdCompId() == null ? 0 : this.getProdCompId()
						.hashCode());
		result = 37
				* result
				+ (getMaterialId() == null ? 0 : this.getMaterialId()
						.hashCode());
		result = 37
				* result
				+ (getApprovalCode() == null ? 0 : this.getApprovalCode()
						.hashCode());
		result = 37
				* result
				+ (getApprovalDate() == null ? 0 : this.getApprovalDate()
						.hashCode());
		result = 37
				* result
				+ (getHistoryDrugCode() == null ? 0 : this.getHistoryDrugCode()
						.hashCode());
		result = 37
				* result
				+ (getMergeStatus() == null ? 0 : this.getMergeStatus()
						.hashCode());
		result = 37 * result
				+ (getProjCode() == null ? 0 : this.getProjCode().hashCode());
		result = 37 * result
				+ (getName() == null ? 0 : this.getName().hashCode());
		result = 37 * result
				+ (getProjIntro() == null ? 0 : this.getProjIntro().hashCode());
		result = 37 * result
				+ (getStarttime() == null ? 0 : this.getStarttime().hashCode());
		result = 37 * result
				+ (getEndtime() == null ? 0 : this.getEndtime().hashCode());
		result = 37 * result
				+ (getProjCat() == null ? 0 : this.getProjCat().hashCode());
		result = 37
				* result
				+ (getProjRemark() == null ? 0 : this.getProjRemark()
						.hashCode());
		result = 37
				* result
				+ (getProjCreateDatetime() == null ? 0 : this
						.getProjCreateDatetime().hashCode());
		result = 37
				* result
				+ (getProjCreateUser() == null ? 0 : this.getProjCreateUser()
						.hashCode());
		result = 37 * result
				+ (getFormCode() == null ? 0 : this.getFormCode().hashCode());
		result = 37 * result
				+ (getFormName() == null ? 0 : this.getFormName().hashCode());
		result = 37 * result
				+ (getSpecCode() == null ? 0 : this.getSpecCode().hashCode());
		result = 37 * result
				+ (getSpecName() == null ? 0 : this.getSpecName().hashCode());
		result = 37 * result
				+ (getMaterialName() == null ? 0 : this.getMaterialName().hashCode());		
		result = 37 * result
				+ (getCompName() == null ? 0 : this.getCompName().hashCode());
		return result;
	}

}